Return the right coordinates
authorMatthias Clasen <matthiasc@src.gnome.org>
Fri, 6 Jun 2008 20:57:50 +0000 (20:57 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 6 Jun 2008 20:57:50 +0000 (20:57 +0000)
svn path=/trunk/; revision=20325

ChangeLog
gdk/x11/gdkwindow-x11.c

index 722f97eedc0269601650facb68be70eb45eb1a5c..6d9ab218aca07aad277a0dedec24e8d2e63e80a0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-06-06  Matthias Clasen  <mclasen@redhat.com>
+
+       Bug 536757 – regression: openoffice.org menus are placed at wrong
+       position since 2.12.10
+
+       * gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents):
+       Return the right coordinates.  
+
 2008-06-06  Behdad Esfahbod  <behdad@gnome.org>
 
        Bug 536185 – monitor font configuration
index 56d5e20688850fdbb00e4ef9a2af2caf41912c42..28dd8fbd4b0e4782fc6b65b192457747f0fffede 100644 (file)
@@ -3379,6 +3379,7 @@ gdk_window_get_frame_extents (GdkWindow    *window,
   Window xwindow;
   Window xparent;
   Window root;
+  Window child;
   Window *children;
   guchar *data;
   Window *vroots;
@@ -3437,13 +3438,15 @@ gdk_window_get_frame_extents (GdkWindow    *window,
       if ((type_return == XA_CARDINAL) && (format_return == 32) &&
          (nitems_return == 4) && (data))
         {
-         guint32 *ldata = (guint32 *) data;
+         gulong *ldata = (gulong *) data;
          got_frame_extents = TRUE;
 
          /* try to get the real client window geometry */
          if (XGetGeometry (GDK_DISPLAY_XDISPLAY (display), xwindow,
-                           &root, &wx, &wy, &ww, &wh, &wb, &wd))
-           {
+                           &root, &wx, &wy, &ww, &wh, &wb, &wd) &&
+              XTranslateCoordinates (GDK_DISPLAY_XDISPLAY (display),
+                                    xwindow, root, 0, 0, &wx, &wy, &child))
+            {
              rect->x = wx;
              rect->y = wy;
              rect->width = ww;